/*****************************************************************************
* File Name: platform.h
*
* Version: 1.0
*
* Description:
* This file contains macro for enabling various modules and also 
* various features
*
*
* Owner: MRAO
*
* Related Document:
* None
*
* Hardware Dependency:
* None
*
* Code Tested With:
* 1. PSoC Creator 3.1 
* 2. ARM GCC 4.8.4
******************************************************************************
* Copyright (2015), Cypress Semiconductor Corporation.
******************************************************************************
* This software is owned by Cypress Semiconductor Corporation (Cypress) and is
* protected by and subject to worldwide patent protection (United States and
* foreign), United States copyright laws and international treaty provisions.
* Cypress hereby grants to licensee a personal, non-exclusive, non-transferable
* license to copy, use, modify, create derivative works of, and compile the
* Cypress Source Code and derivative works for the sole purpose of creating
* custom software in support of licensee product to be used only in conjunction
* with a Cypress integrated circuit as specified in the applicable agreement.
* Any reproduction, modification, translation, compilation, or representation of
* this software except as specified above is prohibited without the express
* written permission of Cypress.
*
* Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
* REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
* Cypress reserves the right to make changes without further notice to the
* materials described herein. Cypress does not assume any liability arising out
* of the application or use of any product or circuit described herein. Cypress
* does not authorize its products for use as critical components in life-support
* systems where a malfunction or failure may reasonably be expected to result in
* significant injury to the user. The inclusion of Cypress' product in a life-
* support systems application implies that the manufacturer assumes all risk of
* such use and in doing so indemnifies Cypress against all charges. Use may be
* limited by and subject to the applicable Cypress software license agreement.
*****************************************************************************/

#ifndef _PLATFORM_H_
#define _PLATFORM_H_

#include "stdint.h"
#include "stdbool.h"
#include "stdarg.h"
#include "project.h"

//#define DEVICE_BATTERY_PARALLEL                   /* Define the DEVICE_BATTERY_PARALLEL macro if battery are connected *
                                                    /* in parallel */
//#define ENABLE_SYSTEM_DEEP_SLEEP                  /* Define the ENABLE_SYSTEM_DEEP_SLEEP macro to enable deep sleep mode */
                                                    /* The BLE link will get disconnected when the FW enters this mode */

//#define MCU_DEEP_SLEEP_DISABLED                   /* Define the MCU_DEEP_SLEEP_DISABLED macro to disable MCU deep sleep */

//#define ENABLE_DEBUG_PIN                          /* Define the ENABLE_DEBUG_PIN macro to enable macros for toggling GPIO */
                                                    /* Make sure to enable Debug_Pin in TopDesign */
#define ENABLE_BSP
  
//#define DEBUG_PRINT                               /* Define the DEBUG_PRINT macro to enable debug prints */

#define SOFTWARE_UART                             /* Enable SW_Tx_UART component in the TopDesign after defining the */ 
                                                    /* SOFTWARE_UART macro. Else enable Debug_UART component */
						                            /* Debug_UART provides faster data transfer compared to SW_Tx_UART. */
                                                    /* However Debug_UART can be routed only to specific pins */

//#define DISABLE_TIMER                             /* Define the DISABLE_TIMER macro to disable the timer module */

//#define DISABLE_FLASH                             /* Define DISABLE_FLASH macro for disabling flash module */

//#define DISABLE_WATCH_DOG                         /* Define the DISABLE_WATCH_DOG macro to disable the watch dog module */
    
#define DISABLE_BATTERY                           /* Define the DISABLE_BATTERY macro to disable the battery module */

#define ENABLE_HARDWARE_WORKAROUND_MINIPROG         /* Define the ENABLE_HARDWARE_WORKAROUND_MINIPROG macro for changing */
                                                    /* the drive mode of the BatteryEn_Voice_Button GPIO from Open Drain */
                                                    /* to Pull Up when powered using the miniprog3 and batteries are not */
                                                    /* connected. This is required as Battery enable and voice button are */
                                                    /* mapped to the same GPIO. If this macro is not enabled and miniprog3 */
                                                    /* is connected without batteries, there is possiblity of firmware */
                                                    /* sensing voice button press though it is not actually pressed */


//#define DISABLE_AUDIO                             /* Define DISABLE_AUDIO module for disabling audio module */
#define AUDIO_RUN_ON_ECO                            /* Define AUDIO_RUN_ON_ECO to run the I2S using ECO instead of IMO */
//#define AUDIO_SEND_FREQUENT_SYNC_PACKET           /* Define AUDIO_SEND_FREQUENT_SYNC_PACKET macro to send the sync */
#define AUDIO_ADC_SAMPLE
//#define DISABLE_AUDIO_NOISE_FILTER

//#define DISABLE_LED                               /* Define DISABLE_LED macro for disabling the LED module */

/* Macro related to Motion sensor module */
//#define DISABLE_MOTION_SENSOR                     /* Define DISABLE_MOTION_SENSOR macro for disabling the motion sensor module */
//#define DISABLE_MOTION_SENSOR_PINREAD
#define ENABLE_MOTION_SENSOR_FLASH_WRITE

/* Macro related to IR module */
#define DISABLE_IR                                /* Define DISABLE_IR macro for disabling IR module */
//#define NEC_PROTOCOL                              /* Define NEC_PROTOCOL macro for sending IR data using NEC protocol */
                                                    /* else Samsung IR protocol will be used for sending data */
//#define IR_PIN_TOGGLE                             /* Define IR_PIN_TOGGLE macro for bit banging the IR data by toggling the GPIO */
                                                    /* else TCPWM will be used */
                                                    /* Note: Please check the comment in the TopDesign.cysch */ 

/* Macro related to Button module */
//#define DISABLE_BUTTON                            /* Define DISABLE_BUTTON macro for disabling button module */

/* Macro related to Keyboard module */
//#define DISABLE_KEYBOARD                          /* Define DISABLE_KEYBOARD macro for disabling the keyboard module */
                                                    /* Note: When DISABLE_KEYBOARD is defined then BLE will advertise when powered on */
#define KEYBOARD_MULTIMEDIA_SUPPORT                 /* Define KEYBOARD_MULTIMEDIA_SUPPORT for supporting multimedia keys */
#define ENABLE_IR_CODES                             /* Define ENABLE_IR_CODES for supporting IR keycodes */
//#define DISABLE_KEYBOARD_INTER_COLUMN_BUTTON      /* Define DISABLE_KEYBOARD_INTER_COLUMN_BUTTON macro for disabling */
                                                    /* the scanning of button in-between the rows */

/* Macro related to BLE module */
//#define DISABLE_BLE                               /* Define DISABLE_BLE macro for disabling BLE module */
#define ENABLE_BLE_LOW_POWER_MODE                   /* Define ENABLE_BLE_LOW_POWER_MODE macro for enabling BLE low power mode */

//#define ENABLE_CONNECTION_UPDATE_DISCONNECT       /* Define ENABLE_CONNECTION_UPDATE_DISCONNECT macro to disconnect */
                                                    /* from the peer device if L2CAP parameter update is rejected  */
#define ENABLE_BLESS_CLOCK_CONFIGURATION            /* Define ENABLE_BLESS_CLOCK_CONFIGURATION macro for setting the BLE clock configuration */
                                                    /* Note: This needs to set depending upon the WCO clock */
#define ENABLE_BONDING                              /* Define ENABLE_BONDING macro for storing the bond information in the flash */   

//#define BLE_GET_STACK_VERSION                     /* Define BLE_GET_STACK_VERSION macro to know the BLE Stack Version */
//#define DISABLE_BLE_ENCYRPTION                    /* Define DISABLE_BLE_ENCYRPTION macro if disable the logic to wait */
                                                    /* until encyprtion is initiated by the central device */

/* Macro related to Trackpad module */
//#define DISABLE_TRACKPAD                          /* Define DISABLE_TRACKPAD macro for disabling trackpad module */ 
//#define TOUCHPAD_TUNER                            /* Define TOUCHPAD_TUNER macro for entering into Tuner mode */
                                                    /* The pins are available by default at P0[0] and P0[1] */
//#define DISABLE_TRACKPAD_SLEEP                    /* Define DISABLE_TRACKPAD_SLEEP for disabling the trackpad sleep */
#define TRACKPAD_TEMPERATURE_VARIATION              /* Define TRACKPAD_TEMPERATURE_VARIATION to enables a logic to */
                                                    /* maintain the sensor baseline when the device is exposed to */
                                                    /* sudden temperature variation */
//#define DISABLE_CUSTOM_POINTER_MOVEMENT           /* Define DISABLE_CUSTOM_POINTER_MOVEMENT macro to disable custom */
                                                    /* ballasitic pointer movement */
//#define DISABLE_CUSTOM_SCROLL_GESTURE             /* Define DISABLE_CUSTOM_SCROLL_GESTURE macro to disable custom */
                                                    /* scroll gesture */
//#define DISABLE_EDGE_SWIPE_TOP                    /* Define DISABLE_EDGE_SWIPE_TOP macro to disable the logic which */
                                                    /* prevents pointer movement during top edge swipe detection  */
//#define DISABLE_CLICK_DETECTION_POINTER_MOVEMENT  /* Define DISABLE_CLICK_DETECTION_POINTER_MOVEMENT macro to disable */
                                                    /* the logic which prevents pointer movement when click detection */
                                                    /*is in progess  */

#if !defined(DISABLE_AUDIO) && !defined(AUDIO_RUN_ON_ECO)
    #warning "Disabling macro AUDIO_RUN_ON_ECO might cause degradation in audio quality due to the IMO inaccuracy"
#endif /* !defined(DISABLE_AUDIO) && !defined(AUDIO_RUN_ON_ECO) */

#endif /* _PLATFORM_H_ */
